Skip to content

fixed typing for Request constructor #362

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 22, 2025

Conversation

FlorianB-DE
Copy link
Contributor

Summary

This fixes the typing issue with the Request constructor.
Typescript typing is used to prevent runtime errors with compile time checks.

In these lines

if (!headers) {
throw new InvalidArgumentError('Missing parameter: `headers`');
}
if (!method) {
throw new InvalidArgumentError('Missing parameter: `method`');
}
if (!query) {
throw new InvalidArgumentError('Missing parameter: `query`');
}
, there are runtime errors thrown that are not reflected by the typescript typing and therefore not catchable by the Typescript compiler.

Linked issue(s)

#356 (comment)

Involved parts of the project

Typing declarations

Added tests?

No

Copilot

This comment was marked as outdated.

@jankapunkt jankapunkt requested a review from Copilot July 22, 2025 08:45
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.

@jankapunkt jankapunkt merged commit 9ad4cd5 into node-oauth:master Jul 22, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants